package com.warehouse.mapper;

import com.warehouse.entity.StockOut;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface StockOutMapper {
    
    List<StockOut> selectAll();
    
    StockOut selectById(@Param("id") Long id);
    
    List<StockOut> selectByOrderId(@Param("orderId") Long orderId);
    
    List<StockOut> selectByProductId(@Param("productId") Long productId);
    
    List<StockOut> selectByDateRange(@Param("startTime") LocalDateTime startTime, 
                                    @Param("endTime") LocalDateTime endTime);
    
    List<StockOut> selectByCustomer(@Param("customer") String customer);
    
    List<StockOut> selectByStatus(@Param("status") String status);
    
    int insert(StockOut stockOut);
    
    int insertBatch(@Param("stockOuts") List<StockOut> stockOuts);
    
    int update(StockOut stockOut);
    
    int deleteById(@Param("id") Long id);
    
    int deleteByOrderId(@Param("orderId") Long orderId);
} 